3.5.70 \(\int \cos (c+d x) (a+b \sec (c+d x))^3 \, dx\) [470]

Optimal. Leaf size=67 \[ 3 a^2 b x+\frac {3 a b^2 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a \left (a^2-b^2\right ) \sin (c+d x)}{d}+\frac {b^2 (a+b \sec (c+d x)) \sin (c+d x)}{d} \]

[Out]

3*a^2*b*x+3*a*b^2*arctanh(sin(d*x+c))/d+a*(a^2-b^2)*sin(d*x+c)/d+b^2*(a+b*sec(d*x+c))*sin(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3927, 4132, 8, 4130, 3855} \begin {gather*} \frac {a \left (a^2-b^2\right ) \sin (c+d x)}{d}+3 a^2 b x+\frac {3 a b^2 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {b^2 \sin (c+d x) (a+b \sec (c+d x))}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]*(a + b*Sec[c + d*x])^3,x]

[Out]

3*a^2*b*x + (3*a*b^2*ArcTanh[Sin[c + d*x]])/d + (a*(a^2 - b^2)*Sin[c + d*x])/d + (b^2*(a + b*Sec[c + d*x])*Sin
[c + d*x])/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3927

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-b^2)
*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 2)*((d*Csc[e + f*x])^n/(f*(m + n - 1))), x] + Dist[1/(d*(m + n - 1)),
Int[(a + b*Csc[e + f*x])^(m - 3)*(d*Csc[e + f*x])^n*Simp[a^3*d*(m + n - 1) + a*b^2*d*n + b*(b^2*d*(m + n - 2)
+ 3*a^2*d*(m + n - 1))*Csc[e + f*x] + a*b^2*d*(3*m + 2*n - 4)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e,
 f, n}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 2] && (IntegerQ[m] || IntegersQ[2*m, 2*n]) &&  !(IGtQ[n, 2] &&  !Int
egerQ[m])

Rule 4130

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e
+ f*x]*((b*Csc[e + f*x])^m/(f*m)), x] + Dist[(C*m + A*(m + 1))/(b^2*m), Int[(b*Csc[e + f*x])^(m + 2), x], x] /
; FreeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]

Rule 4132

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(
C_.)), x_Symbol] :> Dist[B/b, Int[(b*Csc[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x
]^2), x] /; FreeQ[{b, e, f, A, B, C, m}, x]

Rubi steps

\begin {align*} \int \cos (c+d x) (a+b \sec (c+d x))^3 \, dx &=\frac {b^2 (a+b \sec (c+d x)) \sin (c+d x)}{d}+\int \cos (c+d x) \left (a \left (a^2-b^2\right )+3 a^2 b \sec (c+d x)+3 a b^2 \sec ^2(c+d x)\right ) \, dx\\ &=\frac {b^2 (a+b \sec (c+d x)) \sin (c+d x)}{d}+\left (3 a^2 b\right ) \int 1 \, dx+\int \cos (c+d x) \left (a \left (a^2-b^2\right )+3 a b^2 \sec ^2(c+d x)\right ) \, dx\\ &=3 a^2 b x+\frac {a \left (a^2-b^2\right ) \sin (c+d x)}{d}+\frac {b^2 (a+b \sec (c+d x)) \sin (c+d x)}{d}+\left (3 a b^2\right ) \int \sec (c+d x) \, dx\\ &=3 a^2 b x+\frac {3 a b^2 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a \left (a^2-b^2\right ) \sin (c+d x)}{d}+\frac {b^2 (a+b \sec (c+d x)) \sin (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.35, size = 88, normalized size = 1.31 \begin {gather*} \frac {3 a b \left (a c+a d x-b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+a^3 \sin (c+d x)+b^3 \tan (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]*(a + b*Sec[c + d*x])^3,x]

[Out]

(3*a*b*(a*c + a*d*x - b*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + b*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]])
 + a^3*Sin[c + d*x] + b^3*Tan[c + d*x])/d

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 57, normalized size = 0.85

method result size
derivativedivides \(\frac {a^{3} \sin \left (d x +c \right )+3 b \,a^{2} \left (d x +c \right )+3 b^{2} a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+b^{3} \tan \left (d x +c \right )}{d}\) \(57\)
default \(\frac {a^{3} \sin \left (d x +c \right )+3 b \,a^{2} \left (d x +c \right )+3 b^{2} a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+b^{3} \tan \left (d x +c \right )}{d}\) \(57\)
risch \(3 a^{2} b x -\frac {i a^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {2 i b^{3}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{2}}{d}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{2}}{d}\) \(111\)
norman \(\frac {3 a^{2} b x -\frac {4 a^{3} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 \left (a^{3}-b^{3}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 \left (a^{3}+b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-3 a^{2} b x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-3 a^{2} b x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 a^{2} b x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {3 b^{2} a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {3 b^{2} a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) \(202\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)*(a+b*sec(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^3*sin(d*x+c)+3*b*a^2*(d*x+c)+3*b^2*a*ln(sec(d*x+c)+tan(d*x+c))+b^3*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 66, normalized size = 0.99 \begin {gather*} \frac {6 \, {\left (d x + c\right )} a^{2} b + 3 \, a b^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, a^{3} \sin \left (d x + c\right ) + 2 \, b^{3} \tan \left (d x + c\right )}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*sec(d*x+c))^3,x, algorithm="maxima")

[Out]

1/2*(6*(d*x + c)*a^2*b + 3*a*b^2*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 2*a^3*sin(d*x + c) + 2*b^3*
tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 2.92, size = 94, normalized size = 1.40 \begin {gather*} \frac {6 \, a^{2} b d x \cos \left (d x + c\right ) + 3 \, a b^{2} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, a b^{2} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (a^{3} \cos \left (d x + c\right ) + b^{3}\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*sec(d*x+c))^3,x, algorithm="fricas")

[Out]

1/2*(6*a^2*b*d*x*cos(d*x + c) + 3*a*b^2*cos(d*x + c)*log(sin(d*x + c) + 1) - 3*a*b^2*cos(d*x + c)*log(-sin(d*x
 + c) + 1) + 2*(a^3*cos(d*x + c) + b^3)*sin(d*x + c))/(d*cos(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right )^{3} \cos {\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*sec(d*x+c))**3,x)

[Out]

Integral((a + b*sec(c + d*x))**3*cos(c + d*x), x)

________________________________________________________________________________________

Giac [A]
time = 0.50, size = 131, normalized size = 1.96 \begin {gather*} \frac {3 \, {\left (d x + c\right )} a^{2} b + 3 \, a b^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, a b^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)*(a+b*sec(d*x+c))^3,x, algorithm="giac")

[Out]

(3*(d*x + c)*a^2*b + 3*a*b^2*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 3*a*b^2*log(abs(tan(1/2*d*x + 1/2*c) - 1)) +
 2*(a^3*tan(1/2*d*x + 1/2*c)^3 - b^3*tan(1/2*d*x + 1/2*c)^3 - a^3*tan(1/2*d*x + 1/2*c) - b^3*tan(1/2*d*x + 1/2
*c))/(tan(1/2*d*x + 1/2*c)^4 - 1))/d

________________________________________________________________________________________

Mupad [B]
time = 0.92, size = 97, normalized size = 1.45 \begin {gather*} \frac {a^3\,\sin \left (c+d\,x\right )}{d}+\frac {b^3\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {6\,a^2\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {6\,a\,b^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)*(a + b/cos(c + d*x))^3,x)

[Out]

(a^3*sin(c + d*x))/d + (b^3*sin(c + d*x))/(d*cos(c + d*x)) + (6*a^2*b*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/
2)))/d + (6*a*b^2*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d

________________________________________________________________________________________